<?php
/*
 *非法登录
 */
namespace App\Http\Controllers;
//引入controller控制器
use App\Http\Controllers\Controller;
//引入请求类
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;//引入session文件
// use Cookie;//使用cookie类
use Illuminate\Support\Facades\Redis;//引入redis
Class OwnController extends Controller
{
	public function __construct()
	{
		//先获取cookie值
		if(!empty(Redis::get('name'))){
			return redirect('admin/index');
		}else{
			echo "<script>alert('请先登录');location.href='/login/login';</script>";
		}
	}
}